import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import fire_component_msg from '@dfeidao/atom-web/msg/fire';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import set_nodes_cls from '@dfeidao/atom-web/ui/set-nodes-cls';
export default async function a006(fd: IFeidaoAiBrowserComponent, args: { currentTarget: HTMLElement }) {
	const target_id = args.currentTarget.id;
	const node = args.currentTarget.closest('[tab1]') as HTMLDivElement;
	const nodes = Array.from(fd.data.node.querySelectorAll('[tab1]')) as HTMLElement[];
	const a = Array.from(fd.data.node.querySelectorAll('[tab]')) as HTMLElement[];
	set_nodes_cls(nodes, 'bg-themef', false);
	// set_nodes_cls(nodes, 'color-f', false);
	set_nodes_cls(nodes, 'bg-f4', true);
	set_node_cls(node, 'bg-themef', true);
	// set_node_cls(node, 'color-f', true);
	set_node_cls(node, 'bg-f4', false);
	set_nodes_cls(a, 'display-n', true);
	const target_node = fd.data.node.querySelector<HTMLDivElement>('[data-feidao-id="' + target_id + '"]');
	set_node_cls(target_node, 'display-n', false);
	fire_component_msg('zj-000004', 'ec-002', target_id);
}
